class BugsController < ApplicationController
	
	def list
	  @bugs = Bug.find :all
	  render :xml => @bugs.to_xml
	end

	def create
	  @bug = Bug.new(params[:bug])
	  @bug.save
	  render :xml => @bug.to_xml
	end

	def get
	  @bug= Bug.find(params[:id])
	  render :xml => @bug.to_xml
	end

	def delete
	  @bug = Bug.find(params[:id])
	  @bug.destroy
	  render :xml => @bug.to_xml
	end

	def update
	  @bug = Bug.find(params[:id])
	  @bug.update_attributes(params[:bug])
	  render :xml => @bug.to_xml
	end

end
